package main

import (
	"fmt"
)

func add(a int, b int) int {
	return (a + b)
}

func vals() (int, int) {
	return 3, 7
}

func sum(nums ...int) int {
	total := 0
	fmt.Println(nums)

	for _, v := range nums {
		total += v
	}
	fmt.Println(total)
	return total
}

func main12() {
	s := add(1, 2)
	fmt.Println(s)

	fmt.Println(vals())

	sum(1)
	sum(1, 2)
	sum(1, 2, 3)
	nums := []int{1, 2, 3, 4, 5}
	sum(nums...)
}
